package com.hellogood.yaohuo.server.serviceImpl;

import java.util.List;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.hellogood.yaohuo.server.mgr.factory.MgrFactory;
import com.hellogood.yaohuo.shared.entity.Org;
import com.hellogood.yaohuo.shared.services.OrgService;

@SuppressWarnings("serial")
public class OrgServiceImpl extends RemoteServiceServlet implements OrgService {

	@Override
	public List<Org> getAllOrgList() {
		return MgrFactory.getInstance().createOrgMgr().getOrgList();
	}

	@Override
	public List<Org> getUnQuyuedOrgList() {
		return MgrFactory.getInstance().createOrgMgr().getUnQuyuedOrgList();
	}

	@Override
	public List<Org> getOrgListByQuyuCode(String quyuCode) {
		return MgrFactory.getInstance().createOrgMgr().getOrgListByQuyuCode(quyuCode);
	}

	@Override
	public List<Org> getOrgListByStaffCode(String staffCode) {
		return MgrFactory.getInstance().createOrgMgr().getOrgListByUserCode(staffCode);
	}

	@Override
	public Org getOrgByCode(String orgCode) {
		return MgrFactory.getInstance().createOrgMgr().getOrgByCode(orgCode);
	}

}
